import request from '@/utils/request'

export default {

  // 获取经济
  getJIngjieList() {
    return request({
      url: '/serviceucenter/prerequire/getPreRequire',
      method: 'get'
    })
  },

  // 根据房id 获取父任务
  getFuRenWuByFangJianId() {
    return request({
      url: '/serviceucenter/task/getAllTaskByHomeId?homeId=' + localStorage.fangjianhao,
      method: 'get'
    })
  },
  //  根据父id 获取子任务
  geziRenWuByFuId(fuRenWuId) {
    return request({
      url: '/serviceucenter/task/getTaskBySuperSet?superset=' + fuRenWuId,
      method: 'get'
    })
  },

  // 添加多任务
  addTask(data) {
    return request({
      url: '/serviceucenter/task/addTask',
      method: 'post',
      data
    })
  },
  //  删除主任务 或子任务
  deleteTask(taskId) {
    return request({
      url: '/serviceucenter/task/deleteTask/' + taskId,
      method: 'delete'
    })
  }

}
